package install

import (
	"fmt"
	"path"

	"gitee.com/shaddy/k3sinstall/mylog"
)

func InstallImage(config *K3sConfig, pkgPath string) {

	mylog.Info.Printf("正在安装镜像包: %s", pkgPath)
	config.transFile(pkgPath)
	config.runCmdForAllNodes(fmt.Sprintf("ctr i import  %s", path.Join(config.WorkDir, config.PkgFile)))

}
